"""
事件系统模块 - 提供发布/订阅事件处理机制
"""

from .bus import (
    Event,
    EventPriority,
    IEventHandler,
    EventBus,
    get_event_bus,
    publish,
    publish_async,
    subscribe,
    unsubscribe
)

from .manager import (
    EventBusManager,
    TestEventBusManager,
    with_test_event_bus,
    with_isolated_event_bus
)

from .decorators import (
    event_handler,
    event_publisher,
    listen_for,
    publish_on,
    RetryPolicy,
    RetryConfig,
    EventHandlerRegistry,
    register_event_handlers,
    unregister_event_handlers
)

__all__ = [
    # 核心事件类
    "Event",
    "EventPriority", 
    "IEventHandler",
    "EventBus",
    
    # 事件总线函数
    "get_event_bus",
    "publish",
    "publish_async", 
    "subscribe",
    "unsubscribe",
    
    # 事件总线管理
    "EventBusManager",
    "TestEventBusManager",
    "with_test_event_bus",
    "with_isolated_event_bus",
    
    # 装饰器
    "event_handler",
    "event_publisher",
    "listen_for",
    "publish_on",
    
    # 重试配置
    "RetryPolicy",
    "RetryConfig",
    
    # 注册管理
    "EventHandlerRegistry",
    "register_event_handlers",
    "unregister_event_handlers"
]
